package com.azure.apachedubbo.xml.consumer.controller;

import com.azure.apachedubbo.api.service.DemoUserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired  //1.使用xml配置方式对象注入
    //@Reference  //2.使用注解
    private DemoUserService demoUserService;

    @RequestMapping("/all")
    public String findAll(){
        return demoUserService.findAll().toString();
    }
}
